package com.telchina.common.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 流程意见枚举
 **/
@Getter
@AllArgsConstructor
public enum ApproveResultEnum {

    PROCESS("1", "处理中"),
    APPROVE("2", "通过"),
    REJECT("3", "不通过"),
    CANCEL("4", "已取消");

    public static ApproveResultEnum getValueOf(String result) {
        return ArrayUtil.firstMatch(approveResult -> approveResult.getResult().equals(result), ApproveResultEnum.values());
    }

    /**
     * 结果
     */
    private final String result;
    /**
     * 描述
     */
    private final String desc;

}
